//
//  XBLaunchViewController.m
//  fangli
//
//  Created by Ethan on 14-4-2.
//  Copyright (c) 2014年 ethan. All rights reserved.
//

#import "XBLaunchViewController.h"
#import "XBLaunchView.h"
#import "UIView+Category.h"

@interface XBLaunchViewController ()

@end

@implementation XBLaunchViewController

//- (void)dealloc {
//    self.completeBlock = nil;
//}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    }
    return self;
}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    [[UIApplication sharedApplication] setStatusBarHidden:NO];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    [[UIApplication sharedApplication] setStatusBarHidden:YES];

    // Do any additional setup after loading the view.
    XBLaunchView *v = [[XBLaunchView alloc] initWithFrame:[UIScreen mainScreen].bounds];
    v.completeBlock = self.completeBlock;
    [self.view addSubview:v];
}

- (NSUInteger)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskPortrait;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
